From aabf38d4a6cf41cb20b36607142f6e9092e04986 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=3D=3FUTF-8=3Fq=3FFabi=3DC3=3DA1n=3D20Ezequiel=3D20Gallina?= =?utf8?q?=3F=3D?= Date: Thu, 17 May 2012 00:03:01 -0300 Subject: [PATCH] Fixed indentation guess logic to never accept 0 as a possible value --- lisp/progmodes/python.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 16a6d4b45d0..69df0535054 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -437,7 +437,9 @@ These make `python-indent-calculate-indentation' subtract the value of (forward-line 1)) (forward-line 1) (forward-comment 1) - (setq python-indent-offset (current-indentation))))))) + (let ((indent-offset (current-indentation))) + (when (> indent-offset 0) + (setq python-indent-offset indent-offset)))))))) (defun python-indent-context (&optional stop) "Return information on indentation context. -- 2.30.2